/**
 *
 * @author 
 *
 */
class PromptWord extends eui.Component{
    private word:eui.Image;
    private _str:string = "";
    private _time:number = null;
	public constructor() {
   	    super();
        this.skinName = 'PromptWordUISkin';
	}

    public setSour(str:string)
    {
        if(this._str != str)
        {
            this._str = str;
            this.word.source = str;
        }
        this.dingshi();
    }

    public dingshi(): void {
        if(this._time)
        {
            egret.clearTimeout(this._time);
        }
        this._time = egret.setTimeout(this.removeThis,this,2300);
    }

    private removeThis(): void {
        this._time = null;
        if(this.parent) {
            this.parent.removeChild(this);
        }
    }
}
